<template>
	<view class="community-detail">
		<u-cell  :title="detail.title" arrow-direction="down">
			<view slot="label" class="custom-label">
				<text>{{detail.creatorName}}</text>
				<text>{{detail.createdAt}}</text>
			</view>
		</u-cell>
		<view v-html="detail.content" class="content">
			{{detail}}
		</view>
	</view>
</template>

<script>
	import {getCommunityDetail} from '@/api/home.js'
	export default {
		data() {
			return {
				id:null,
				detail:null
			}
		},
		methods: {
			async getCommunityDetail(id){
				const res = await getCommunityDetail(id)
				console.log(res)
				this.detail = res.data
			}
		},
		onLoad(options){
			this.id = options.id
			this.getCommunityDetail(options.id)
		}
	}
</script>

<style lang="scss" scoped>
   .community-detail {
     ::v-deep .u-cell__body {
       height: 144rpx;
       padding: 24rpx 26rpx 24rpx 32rpx !important;
   
       .u-cell__title-text {
         font-size: 32rpx;
         color: #333;
         line-height: 1.5;
       }
     }
   
     .custom-label {
       color: #BDBDBD;
       font-size: 24rpx;
       line-height: 1.5;
       margin-top: 11rpx;
       display: flex;
       justify-content: space-between;
     }
   
     .content {
		 display: block;
       padding: 30rpx;
       color: #686868;
       font-size: 28rpx;
       line-height: 1.5;
     }
   }
</style>
